import App from './App'
import Vue from "vue";
import utils from "./js/utils";
import api from "./js/request/request";
import config from "./js/config";
import { format } from "timeago.js";
import share from '@/js/share.js'
import moment from "moment";
import empty from "@/components/empty";
Vue.prototype.$api = api;
Vue.prototype.$utils = utils;
Vue.prototype.$config = config
import uView from 'uview-ui'
Vue.use(uView)
Vue.mixin(share)

Vue.component("Empty", empty);
Vue.filter("changeTime", function(dateStr) {
  return format(dateStr, "zh_CN");
});
Vue.filter("dateFormat", function (dateStr, pattern = "YYYY-MM-DD") {
  if (!dateStr) {
    return dateStr;
  }
  return moment(dateStr).format(pattern);
});
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()